A Diffie-Hellman key exchange may be used for securely exchanging cryptographic keys over a public network. The Diffie-Hellman key exchange allows two devices that have no prior knowledge of each other to jointly establish a shared secret key over the public channel. The shared secret key may then be used to encrypt a session key and/or traffic associated with a symmetric key cipher.